import { get, post_json } from '@/http/axios'
export default {
  namespaced: true,
  state: {
    // 订单数据
    orderDetailsData:[]
  },
  mutations: {
    SET_ORDERDETAILSDATA(state, payload){
      state.orderDetailsData = payload
    }
  },
  actions: {
    // 获取订单数据
    async getOrderDetailsData({commit}, payload){
      let res = await get('/order/findById', payload)
    //   console.log(res);
    //   console.log(res.data.data);
      commit('SET_ORDERDETAILSDATA', res.data.data)
    }
  }
}